import server from '@dt/server/dt'
import Config from '@dt/server/base/Config'
import DtDelegate from './DtDelegate.js'
import DtAuth from './DtAuth.js'
import dt from '@dt/dt'
import Fly from 'flyio/dist/npm/wx'

server.handle.setupFly(Fly)
server.setAuth(new DtAuth()).setConfig(new Config(true)).setDelegate(new DtDelegate())
server.handle.refreshPath =
  '/hft-sc-oauth2/oauth/token?grant_type=refresh_token&client_id=hft&refresh_token=[refreshToken]'
dt.server = server

export default server
